﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace web4
{
    public partial class _2016020719_3 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Panel1.Visible = true;
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            Panel1.Controls.Add(new LiteralControl("<hr>"));
            for (int i = 2; i <= 4; i++)
            {
                Label Ib = new Label();
                Ib.Text = "Label" + (i).ToString();
                Ib.ID = "Label" + (i).ToString();
                Panel1.Controls.Add(Ib);
                Panel1.Controls.Add(new LiteralControl("<br>"));
                TextBox tb = new TextBox();
                tb.Text = "TextBox" + (i).ToString();
                tb.ID = "TextBox" + (i).ToString();
                Panel1.Controls.Add(tb);
                Panel1.Controls.Add(new LiteralControl("<br>"));
            }
        }
    }
}